import worker from '@ohos.worker';
import { LoadAndScanXml } from "../scan/xmlScaner"

var parentPort = worker.parentPort;

parentPort.onmessage = function (e) {
    let data = e.data;
    switch(data.type) {
        case "normal":
            let viewNode = LoadAndScanXml(data.data);
            parentPort.postMessage({type: "ViewNodeUpdate", data: viewNode})
            break;
        default:
            break;
    }
}